/**
 * Created by Administrator on 2016/8/18.
 * 房屋所属、房屋类型、街道、小区、幢号、室号、房屋坐落、物业类型、楼层类型、经营业态、建筑面积、套内面积、产别、产权人、
 * 产权人身份证、产权人电话、建成年份、售价标准（租金标准）、总售价（租金总价）
 */
(function () {
    var house_table = document.getElementById("houses_data_list");
    var i = 0;
    for (; i < houses.length; i++) {
        var tr = document.createElement("tr");
        var td = document.createElement("td");
        td.innerHTML = houses[i].id;
        var td1 = document.createElement("td");
        td1.innerHTML = houses[i].order;
        var td2 = document.createElement("td");
        td2.innerHTML = houses[i].type;
        var td3 = document.createElement("td");
        td3.innerHTML = houses[i].area;
        var td4 = document.createElement("td");
        td4.innerHTML = houses[i].community;
        var td5 = document.createElement("td");
        td5.innerHTML = houses[i].construction_area;
        var td6 = document.createElement("td");
        td6.innerHTML = houses[i].right_person;
        var td7 = document.createElement("td");
        td7.innerHTML = houses[i].standard_price;
        tr.appendChild(td);
        tr.appendChild(td1);
        tr.appendChild(td2);
        tr.appendChild(td3);
        tr.appendChild(td4);
        tr.appendChild(td5);
        tr.appendChild(td6);
        tr.appendChild(td7);
        ////tr.setAttribute("onClick", "tr_click(event)");
        //tr.setAttribute("data-toggle", "modal");
        //tr.setAttribute("data-target", "#myModal");
        house_table.appendChild(tr);
    }




})();
$('tr').click(
    function(){
        var houseId = $(this).children().first().html();
        $('#myModal').modal({
            keyboard:false,
            remote:"house_detail.html"
        });
    });
$("#myModal").on("hidden.bs.modal", function() {
    $(this).removeData("bs.modal");
});